myhashtable: myhashtable_test
	./myhashtable_test

myhashtable_test: myhashtable_test.c ../myhashtable.c ../mylist.c
	gcc $^ -o $@

mydfa: mydfa_test
	./mydfa_test

mydfa_test: mydfa_test.c ../mydfa.c
	gcc $^ -o $@

mystack: mystack_test
	./mystack_test

mystack_test: mystack_test.c ../mystack.c
	gcc $^ -o $@

mylist: mylist_test
	./mylist_test

mylist_test: mylist_test.c ../mylist.c ../common.c
	gcc $^ -o $@

mybtree: mybtree_test
	./mybtree_test

mybtree_test: mybtree_test.c ../mybtree.c ../mybitmap.c ../common.c
	gcc $^ -o $@

mybitmap: mybitmap_test
	./mybitmap_test

mybitmap_test: mybitmap_test.c ../mybitmap.c
	gcc $^ -o $@

run_example_file: example_file
	./example_file

example_file: example_file.c
	gcc $^ -o $@

myrbtree: myrbtree_test
	./myrbtree_test

myrbtree_test: myrbtree_test.c ../myrbtree.c
	gcc -g -O0 $^ -o $@

mysort: mysort_test
	./mysort_test

mysort_test: mysort_test.c ../mysort.c ../common.c
	gcc $^ -o $@

myheap: myheap_test
	./myheap_test

myheap_test: myheap_test.c ../myheap.c ../common.c
	gcc $^ -o $@

myqueue: myqueue_test
	./myqueue_test

myqueue_test: myqueue_test.c ../myqueue.c ../mylist.c ../common.c
	gcc $^ -o $@


test: mytest
	./mytest
mytest: mytest.c
	gcc $< -o $@

clean:
	rm -f myheap_test myqueue_test mytest mysort_test myrbtree_test mybtree_test mybtree_test.idx mybtree_test.data example_file example_file.data mybitmap_test \
	mylist_test mystack_test mydfa_test myhashtable_test
	